/* OSM layers for gvSIG. 
 * Geographic Information System of the Valencian Government
*
* Copyright (C) 2012 Nacho Brodin
* 
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 
* MA  02110-1301, USA.
* 
*/
package org.gvsig.raster.osm.app.osmclient;

/**
 * Fixed parameters for a Open Street Map server. These parameters 
 * are known for each server added.
 * 
 * @author Nacho Brodin (nachobrodin@gmail.com)
 */
public class OSMServer {
	private String serverURL  = null;
	private int    levels     = 0;
	private String name       = null;
	private String suffix     = null;
	
	/**
	 * Constructor
	 * @param server
	 * 			The server URL
	 * @param levels
	 * 			The number of resolution levels
	 * @param name
	 * 			Layer's name
	 * @param suffix
	 * 			The suffix of the image file.
	 * 			
	 */
	public OSMServer(String server, int levels, String name, String suffix) {
		this.serverURL = server;
		this.levels = levels;
		this.name = name;
		this.suffix = suffix;
	}

	/**
	 * Gets the server URL
	 * @return
	 */
	public String getServerURL() {
		return serverURL;
	}

	/**
	 * Gets the number of resolution levels
	 * @return
	 */
	public int getLevels() {
		return levels;
	}

	/**
	 * Gets the layer's name
	 * @return
	 */
	public String getName() {
		return name;
	}

	/**
	 * Gets the suffix of the image file. 
	 * This suffix depends on the kind of the image (tif, png, jpg,...)
	 * @return
	 */
	public String getSuffix() {
		return suffix;
	}
	
	public String toString() {
		return name;
	}
}
